This lesson will continue adding to your object-oriented design skills through a discussion of more of the SOLID and GRASP design principles. The lesson will also look at Design by Contract.
This lesson will look at these principles:
Controller (GRASP)
Polymorphism (GRASP)
Liskov substitution (SOLID)
Design by contract
Open/closed (SOLID)
Pure fabrication (GRASP)
Learning Outcomes
Identify where the Controller Principle is applicable
Identify appropriate use of Polymorphism in an object-oriented software design
Describe the constraints on subclass behavior that are imposed by the Liskov Substitution Principle
Describe the Design by Contract principle
Describe why the Open/Closed principle will reduce testing when extending the functionality of an existing class
Describe how Pure Fabrication can eliminate one or more classes with low cohesion
Analyze an object-oriented software design for adherence to these design principles.
Study Resources
For your study of this topic, use these resources.
Overview of the SOLID Principles (3:26) from Learning S.O.L.I.D. Programming Principles available through the RIT library gives a general introduction to the principles. The examples are in Python but the principles still hold
GRASP Patterns (5:20) from Learning S.O.L.I.D. Programming Principles. Gives a general introduction to the principles. The examples are in Python but the principles still hold.
The Principles of OOD by Bob Martin (Uncle Bob) the creator of the SOLID set of OO design principles though not the creator of the acronym. There are pages on each one of the principles. Read through these papers for more information about these two SOLID principles.
Object-oriented design II - team (2 exercise points)
Your project team will analyze the design of your term project against the principles discussed in the Object-oriented design II class (Controller, Polymorphism, Liskov Substitution Principle, Open/Closed, Pure Fabrication). Provide your analysis in this Word document and submit it to the Object-oriented design II - team myCourses dropbox in the Team Exercises area by the time indicated on the schedule for your class section. This exercise is worth two exercise points.
End-Of-Day Exercises
Object-oriented design II - quiz
Read the book chapters listed above from Patterns in Java and Beginning SOLID Principles and Design Patterns for ASP.NET Developers.
Watch the videos above from DevExpress CTO Messages and the ones from Learning S.O.L.I.D. Programming Principles.
After watching the videos, before the deadline specified in the schedule for your section, complete the quiz, Object-oriented design II which is in the myCourses Quiz area.